package ${serviceImplPackage};

import ${entityPackage}.${entity}Entity;
import ${mapperPackage}.${entity}Mapper;
import ${servicePackage}.${entity}Service;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;



/**
 * 描述: ${table.comment}
 * author: ${author}
 * date: ${date}
 */
@Service
public class ${entity}ServiceImpl implements ${entity}Service {
    @Autowired
    private ${entity}Mapper ${entity?uncap_first}Mapper;

    @Override
    public Integer insert(${entity}Entity entity){
        return ${entity?uncap_first}Mapper.insert(entity);
    }

    @Override
    public Integer delete(int id){
        return ${entity?uncap_first}Mapper.delete(id);
    }

    @Override
    public Integer update(${entity}Entity entity){
        return ${entity?uncap_first}Mapper.update(entity);
    }

    @Override
    public List<${entity}Entity> select(${entity}Entity entity){
        return ${entity?uncap_first}Mapper.select(entity);
    }

    @Override
    public ${entity}Entity selectById(int id) {
        return ${entity?uncap_first}Mapper.selectById(id);
    }
}
